package su.myspringbootprojects.springsecuritylearn.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

/**
 * Класс ApplicationUser
 * <p/>
 * Entity, моделирующая пользователя
 * <p/>
 *
 * @author petr.mikhailin
 * created 02.07.2024 18:42
 */
@Entity
@Getter
@Setter
public class ApplicationUser {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    private String firstName;

    private String lastName;

    @Column(unique = true)
    private String email;
    private String password;

    @ManyToOne
    @JoinTable(name = "user_roles")
    private Roles role;
}
